require 'net/http'
require 'net/https'

#utility class for getting the cookie of a user
class Cookie
  def self.get(user, pass)
    cookiedata = "login=" + user + "&password=" + pass
    http = Net::HTTP.new("ssl.rapidshare.com", 443)
    http.use_ssl = true
    resp = http.post("/cgi-bin/premiumzone.cgi", cookiedata)
    cookie = resp.response['set-cookie']
    return cookie
  end
end